package institutional

/**
 * Semester
 * A domain class describes the data object and it's mapping to the database
 */
class Semester {

	/* Automatic timestamping of GORM */
	Date	dateCreated
	Date	lastUpdated
	
	
	int year
	int semesterNumber
	boolean inscriptionAvailable
	
    static mapping = {
    }
    
	static constraints = {
		//year (unique:[semesterNumber])
    }
	
	/*
	 * Methods of the Domain Class
	 */
	@Override	// Override toString for a nicer / more descriptive UI 
	public String toString() {
		return "${semesterNumber} - ${year}";
	}
}
